<div class="user_left">
    <ul>
        <dl class="tab_0" data-flag="1"><span>{:__('个人信息')}</span><i class='layui-icon'>&#xe61a;</i></dl>
        <dl class="tab_1" data-flag="1-1"><i class='layui-icon'>&#xe60a;</i><a data-target='/index/User/user'>{:__('个人中心')}</a></dl>
        <dl class="tab_1" data-flag="1-2"><i class='layui-icon'>&#xe612;</i><a data-target='/index/User/updateinfo'>{:__('基本资料')}</a></dl>
        <dl class="tab_1" data-flag="1-3"><i class='layui-icon'>&#xe6b2;</i><a data-target='/index/User/auth'>{:__('认证中心')}</a></dl>
        <dl class="tab_1" data-flag="1-4"><i class='layui-icon'>&#xe658;</i><a data-target='/index/User/reputation'>{:__('信用明细')}</a></dl>
        <dl class="tab_1" data-flag="1-5"><i class='layui-icon'>&#xe642;</i><a data-target='/index/User/changepwd'>{:__('修改密码')}</a></dl>

        <dl class="tab_0" data-flag="2"><span>{:__('财务管理')}</span><i class='layui-icon'>&#xe61a;</i></dl>
        <dl class="tab_2" data-flag="2-1"><i class='layui-icon'>&#xe62d;</i><a data-target='/index/User/online'>{:__('在线充值')}</a></dl>
        <dl class="tab_2" data-flag="2-2"><i class='layui-icon'>&#xe62d;</i><a data-target='/index/User/withdrawal'>{:__('提现申请')}</a></dl>
        <dl class="tab_2" data-flag="2-6"><i class='layui-icon'>&#xe62d;</i><a data-target='/index/User/rechargelog'>{:__('充值明细')}</a></dl>
        <dl class="tab_2" data-flag="2-5"><i class='layui-icon'>&#xe62d;</i><a data-target='/index/User/withdrawallog'>{:__('提现明细')}</a></dl>
        <dl class="tab_2" data-flag="2-4"><i class='layui-icon'>&#xe62d;</i><a data-target='/index/User/integrallog'>{:__('账目明细')}</a></dl>

        <dl class="tab_0" data-flag="3"><span>{:__('我是雇主')}</span><i class='layui-icon'>&#xe61a;</i></dl>
        <dl class="tab_3" data-flag="3-1"><i class='layui-icon'>&#xe609;</i><a data-target='/index/index/release'>{:__('发布任务')}</a></dl>
        <dl class="tab_3" data-flag="3-2"><i class='layui-icon'>&#xe62a;</i><a data-target='/index/User/taskpub'>{:__('我发布的悬赏任务')}</a></dl>

        <dl class="tab_0" data-flag="4"><span>{:__('我是写手')}</span><i class='layui-icon'>&#xe61a;</i></dl>
        <dl class="tab_4" data-flag="4-1"><i class='layui-icon'>&#xe62a;</i><a data-target='/index/User/jointask'>{:__('我参加的悬赏任务')}</a></dl>
        <dl class="tab_4" data-flag="4-2"><i class='layui-icon'>&#xe63c;</i><a data-target='/index/Task/successtask'>{:__('我成功的案例')}</a></dl>

        <dl class="tab_0" data-flag="5"><span>{:__('仲裁管理')}</span><i class='layui-icon'>&#xe61a;</i></dl>
        <dl class="tab_5" data-flag="5-1"><i class='layui-icon'>&#xe637;</i><a data-target='/index/Task/arbitration'>{:__('仲裁列表')}</a></dl>
    </ul>
</div>
<script>
    $(".user_left dl a").click(function(){
        var _this = $(this);
        var url = _this.attr("data-target");
        window.location.href=url;
    });
   var _tab = "{$tab}";
   $("dl[data-flag="+_tab+"]").css("background","rgb(243,201,148)");
    $(".tab_0").each(function(){
        var _this = $(this);
        var dataflag = _this.attr("data-flag");
        var len = $(".tab_"+dataflag).length;
        $(".tab_"+dataflag).css("font-size",'12px');
        $(".tab_"+dataflag).css("margin-left",'10px');
        $(".tab_"+dataflag).css("padding",'5px');
        $(".tab_"+dataflag).css("border-bottom",'1px solid #FF7700');
        $(".tab_"+dataflag).eq(len-1).css("border-bottom",'0px');
        $(".tab_"+dataflag+' i').css('color','rgb(242,180,99) !important');
        $(".tab_"+dataflag+' i').css('margin-right','5px');
       var tab = _tab.split("-")[0];
        if(parseInt(tab)>0){
            if(dataflag != tab){
                $(".tab_"+dataflag).css("display",'none');
                $(_this).find("i").html("&#xe619;");
            }
        } else {
            if(dataflag != 1){
                $(".tab_"+dataflag).css("display",'none');
                $(_this).find("i").html("&#xe619;");
            }
        }
    });
    $(".tab_0").click(function(){
        var _this = $(this);
        var dataflag = _this.attr("data-flag");
        if($(".tab_"+dataflag).css("display") == 'block'){
            $(".tab_"+dataflag).css("display",'none');
            $(_this).find("i").html("&#xe619;");
        } else {
            $(".tab_"+dataflag).css("display",'block');
            $(_this).find("i").html("&#xe61a;");
        }
    });
</script>